<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>

<head>
    <title>路线管理</title>

    <!--<link href="../../../statics/bootstrap/css/bootstrap.min.css" rel="stylesheet" />-->
    <!--<link href="../../../statics/styles/navbar.css" rel="stylesheet" />-->




    <style>
        .side-menu {
            margin-top: 50px;
        }
    </style>

</head>

<body>

    <div class="container">
        <div div="row">
            <div class="col-sm-10">
                <div class="row">
                    <div class="panel panel-default">

                        <div class="panel-heading">路线管理</div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-sm-offset-1 col-sm-10">

                                    <form class="form-horizontal" role="form" method="post" action="">
                                        <div class="row">
                                            <div class="col-sm-6">
                                                <div class="form-group">
                                                    <div class="col-sm-4">
                                                        <label class="control-label">网点名称:</label>
                                                    </div>
                                                    <div class="col-sm-8">
                                                        <input name="networkName" type="text" class="form-control " />

                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-6">
                                                <div class="form-group">
                                                    <div class="col-sm-4">
                                                        <label for="inputStartLocation" class="control-label">所在地:</label>
                                                    </div>

                                                    <div class="col-sm-8">
                                                        <div class="input-group ">
                                                            <input id="inputStartLocation" type="text" class="form-control " placeholder="" disabled/>

                                                            <input id="inputStartLocationHidden" type="hidden" name="startLocation">
                                                            <div class="input-group-btn">
                                                                <button id="btnStartLocation" class="btn btn-default" type="button">
                                                                    <span class="glyphicon glyphicon-globe"></span>
                                                                </button>
                                                            </div>
                                                        </div>
                                                    </div>


                                                </div>
                                            </div>
                                        </div>


                                        <div class="row">
                                            <div class="col-sm-6">
                                                <div class="form-group">
                                                    <div class="col-sm-4">
                                                        <label class="control-label">联系人姓名:</label>
                                                    </div>
                                                    <div class="col-sm-8">
                                                        <input type="text" class="form-control" name="phoneNo">
                                                    </div>
                                                </div>

                                            </div>
                                            <div class="col-sm-6">
                                                <div class="form-group">
                                                    <div class="col-sm-4">
                                                        <label class="control-label">联系人电话:</label>
                                                    </div>
                                                    <div class="col-sm-8">
                                                        <input type="tel" class="form-control" name="phoneNo">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <button type="submit" class="btn btn-warning">查询</button>
                                        <button type="button" class="btn btn-success">新增</button>



                                    </form>

                                </div>
                            </div>

                        </div>
                    </div>

                </div>
                <div class="row">

                    <!--线路列表-->
                    <table class="table table-bordered table-hover" data-toggle="table">
                        <thead>
                            <tr>
                                <th>网点名称</th>
                                <th>所在地</th>
                                <th>详细地址</th>
                                <th>联系人</th>
                                <th>联系人电话</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>广州网点</td>
                                <td>广州</td>
                                <td>广州市天河区林和西路101号</td>
                                <td>小强</td>
                                <td>
                                    13000013000
                                </td>
                                <td>已审核</td>
                                <td>
                                    <button class="btn btn-primary">修改</button>
                                    <button class="btn btn-danger">删除</button>
                                </td>
                            </tr>
                            <tr>
                                <td>佛山黄岐网点</td>
                                <td>佛山市-南海区</td>
                                <td>广东省佛山市南海区大沥镇黄岐xxxxx</td>
                                <td>小红</td>
                                <td>
                                    138001380000
                                </td>
                                <td>已审核</td>
                                <td>
                                    <button class="btn btn-primary">修改</button>
                                    <button class="btn btn-danger">删除</button>
                                </td>
                            </tr>
                            <tr>
                                <td>佛山禅城祖庙网点</td>
                                <td>佛山市-禅城区</td>
                                <td>广东省佛山市南海区大沥镇黄岐xxxxx</td>
                                <td>小小</td>
                                <td>
                                    138001380000
                                </td>
                                <td>已审核</td>
                                <td>
                                    <button class="btn btn-primary">修改</button>
                                    <button class="btn btn-danger">删除</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>

                </div>
                <div class="row">
                    <!--                    <span class="pull-right">第1-20条记录，共100条记录</span>-->
                    <ul class="pagination pagination-sm pull-left">
                        <li class="disabled"><a href="#">&laquo;</a></li>
                        <li class="active"><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li><a href="#">&raquo;</a></li>
                    </ul>

                </div>
            </div>

        </div>
    </div>




    <!-- Large modal -->

    <div id="myRegionSelectorModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">地区选择</h4>
                </div>
                <div class="modal-body">
                    <div class="container" id="divRegionSelector"></div>
                </div>

            </div>
        </div>
    </div>


    <script src="../../../statics/js/jquery-3.1.1.min.js"></script>
    <script src="../../../statics/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../../statics/echarts/echarts.min.js"></script>
    <script src="../../../statics/js/regionselector.js"></script>

    <script>
        $(function () {
            //地图选择器
            var myRegionSelector = regionselector.init('divRegionSelector');
            myRegionSelector.click(function (param) {
                alert(param.value);

            });

            //始发地选择
            $('#btnStartLocation').click(function () {
                myRegionSelector.reset();
                $('#myRegionSelectorModal').modal();
                myRegionSelector.click(function (param) {
                    $('#inputStartLocation').val(param.text);
                    $('#inputStartLocationHidden').val(param.value);
                    $('#myRegionSelectorModal').modal('hide');

                });
            });

            //终点地选择
            $('#btnEndLocation').click(function () {
                myRegionSelector.reset();
                $('#myRegionSelectorModal').modal();
                myRegionSelector.click(function (param) {
                    $('#inputEndLocation').val(param.text);
                    $('#inputEndLocationHidden').val(param.value);
                    $('#myRegionSelectorModal').modal('hide');

                });
            });

        })
    </script>
</body>

</html>